{extend name="common/base"}
{block name="content"}
<table id="log" lay-filter="log"></table>
{/block}

{block name="js"}
{__block__}
<script>
    layui.use(['form', 'table'], function () {
        var $ = layui.jquery;
        var table = layui.table;
        var form = layui.form;
        table.render({
            elem: '#log'
            ,height: 'full-220'
            ,data: {$logs}
            ,page: true //开启分页
            ,limit: 15
            ,cols: [[ //表头
                {checkbox: true},
                {title: '序号', width: 80, templet: '<div>{{d.LAY_INDEX}}</div>', sort: true}
                ,{field: 'user_id', width: 100, title: '用户', templet: '<div>{{d.user.name}}</div>', sort: true}
                ,{title: '操作', templet: '<div>{{d.note}} {{d.contract.name}}</div>'}
                ,{field: 'location', width: 150, title: '定位',sort: true}
                ,{field: 'ip', width: 150, title: 'IP',sort: true}
                ,{field: 'create_time', width: 200, title: '时间',sort: true}
            ]]
        });
    })
</script>
{/block}